package 常用方法.转化.格式化;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 姚东名
 * Date: 2024-06-20
 * Time: 12:04
 */
public class Test {
    public static void main(String[] args) {
        String s = String.format("%d-%d-%d", 2024, 6, 20);
        System.out.println(s);
    }
}

/*
执行结果：
2024-6-20
 */